package day5.unusual;

import java.io.FileNotFoundException;

/**
 * Created with IntelliJ IDEA.
 * Description:
 * User: watermelon
 * Date: 2025-05-31
 * Time: 20:05
 */

public class Main {
    static class log extends Exception{
        public log(String name)
        {
            super(name);
        }
    }
    public static void function(int num) throws log
    {
        if(num==1)
        {
            throw new log("heLLO,wor");
        }
    }
    public static void main(String[] args)  {
        try{
            function(1);
        }
        catch (log lg)
        {
            System.out.println("自定义异常");
        }

    }
}
